<?php

namespace app\admin\validate\finance;

use think\Validate;

class Spendinglog extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'amount' => 'egt:0|number',
        'desc'   => 'length:0,255'
    ];
    /**
     * 提示消息
     */
    protected $message = [
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'   => ['amount', 'desc'],
        'edit' => ['amount', 'desc'],
    ];

    public function __construct(array $rules = [], $message = [], $field = [])
    {
        $this->field = [
            'amount' => __('Amount'),
            'desc'   => __('Desc'),
        ];
        parent::__construct($rules, $message, $field);
    }
    
}
